package com.biqee.exception;


public class BusinessUnCheckedException extends RuntimeException {

	  /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
		private ErrorCode errorCode;
		

	    public ErrorCode getErrorCode() {
			return errorCode;
		}

		public void setErrorCode(ErrorCode errorCode) {
			this.errorCode = errorCode;
		}

		public BusinessUnCheckedException(Throwable cause) {
	        super(cause);
	        this.errorCode=ErrorCode.System_001;
	    }
		
		public BusinessUnCheckedException(String message) {
			 super(message);
			this.errorCode=ErrorCode.System_001;
	       
	    }

	    public BusinessUnCheckedException(ErrorCode errorCode, Object...parameters)  {
	        super(String.format(errorCode.toString(), parameters));
	    }

	    public BusinessUnCheckedException(ErrorCode errorCode,Throwable cause) {
	        super(errorCode.toString(),cause);
	    }

	    public BusinessUnCheckedException(ErrorCode errorCode, Throwable cause, Object...parameters) {
	        super(String.format(errorCode.toString(), parameters), cause);
	    }
}
